Skip to content

Add potion support to more entities#8630

Merged
APickledWalrus merged 9 commits into
dev/featurefrom
feature/expanded-potion-support
Jun 12, 2026
Merged

Add potion support to more entities#8630
APickledWalrus merged 9 commits into
dev/featurefrom
feature/expanded-potion-support

Conversation

@APickledWalrus

Copy link
Copy Markdown
Member

Problem

Currently, potion syntax does not support Area Effect Clouds or Arrows (that is, the projectiles themselves, in flight).
This was something I missed in my original rework of Skript's potion syntax.

Solution

I've reworked potion syntax, mainly ExprPotionEffect and ExprPotionEffects, to work with a new provider system designed to make supporting new "potion providers" easy. There are 3 default implementations:

  • LivingEntityProvider
  • ItemTypeProvider
  • EntityProvider
    • This is the new behavior for Arrows/AoE clouds
    • These two classes have the exact same potion API, but no common interface :(
    • I instead made one and created an additional wrapper around those two to reduce duplication

There is also a "NullProvider" which is just a dummy class. Used to avoid excessive null checking for invalid types (which will cause a runtime error if encountered)

image

I've also fixed a small issue where remove all (in ExprPotionEffects) did not properly consider active/hidden effects for living entities.

Testing Completed

In-game testing for new supported providers.
Existing potion test is extremely thorough and did not reveal any issues with the new system.

Supporting Information


Completes: none
Related: none
AI assistance: none

@APickledWalrus APickledWalrus requested a review from a team as a code owner May 5, 2026 20:51
@APickledWalrus APickledWalrus added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label May 5, 2026
@APickledWalrus APickledWalrus added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label May 5, 2026
@APickledWalrus APickledWalrus requested review from Burbulinis and TheMug06 and removed request for a team May 5, 2026 20:51
@skriptlang-automation skriptlang-automation Bot added the needs reviews A PR that needs additional reviews label May 11, 2026
@APickledWalrus APickledWalrus moved this to In Review in 2.16 Releases May 20, 2026
@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Merge in 2.16 Releases May 30, 2026
@skriptlang-automation skriptlang-automation Bot added feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. and removed needs reviews A PR that needs additional reviews labels May 30, 2026
@APickledWalrus APickledWalrus merged commit 2c30aee into dev/feature Jun 12, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting Merge to Done - Awaiting Release in 2.16 Releases Jun 12, 2026
@APickledWalrus APickledWalrus deleted the feature/expanded-potion-support branch June 12, 2026 16:53
@skriptlang-automation skriptlang-automation Bot added completed The issue has been fully resolved and the change will be in the next Skript update. and removed feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. labels Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something.

Projects

Status: Done - Awaiting Release

Development

Successfully merging this pull request may close these issues.

3 participants